/*
 * portfolio.h
 *
 *  Created on: 26/mag/2014
 *      Author: PegorarS
 */

#ifndef PORTFOLIO_H_
#define PORTFOLIO_H_

#include "types.h"
#include "position.h"
#include <vector>


using namespace NS_STOCKEXCHANGE;
using namespace std;

class Portfolio{
public:
	Portfolio(CASH initialCashAmount = 2000.0);

	bool Withdraw(CASH amount);
	void Deposit(CASH amount);
	CASH GetAmount() const;
	void Add(Position *pos);
	void Remove(Position *pos);
	bool GetPosition(Position *nextPos);	//itera su tutte le posizioni associate

private:
	CASH m_money;
	vector<Position *> m_vPositions;
	vector<Position *>::iterator m_iCurrentPosition;
};




#endif /* PORTFOLIO_H_ */
